import 'package:flutter/material.dart';
import 'package:flutter_blog/compoments/travel/proflie/prefilePage.dart';
import 'package:flutter_blog/compoments/travel/mapPage/mapScreen.dart';
import 'package:flutter_blog/compoments/travel/travelPlan/planScreen.dart';
import 'package:flutter_blog/compoments/travel/travels/travelsPage.dart';

class TravelIndexPage extends StatefulWidget {
  TravelIndexPage({Key key}) : super(key: key);

  @override
  _TravelIndexPageState createState() => _TravelIndexPageState();
}

class _TravelIndexPageState extends State<TravelIndexPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('旅程'),
      ),
      body: DefaultTabController(
        length: 4,
        child: Material(
          child: Column(
            children: <Widget>[
              TabBar(
                labelColor: Color.fromRGBO(196, 148, 81, 1),
                indicatorWeight: 3,
                indicatorSize: TabBarIndicatorSize.label,
                indicatorColor: Color.fromRGBO(196, 148, 81, 1),
                tabs: <Widget>[
                  Tab(
                    text: '出行计划',
                  ),
                  Tab(
                    text: '旅行相册',
                  ),
                  Tab(
                    text: '游记',
                  ),
                  Tab(
                    text: '旅行地图',
                  ),
                ],
              ),
              Expanded(
                  flex: 1,
                  child: TabBarView(children: <Widget>[
                    PlanScreen(),
                    ProflieScreen(),
                    TravelsScreen(),
                    MapScreen(),
                  ]))
            ],
          ),
        ),
      ),
    );
  }
}
